﻿using System;
using Jayden.Dll.Web.Enums;
using Jayden.Dll.Web.HtmlControls.Descriptions;
using Jayden.Dll.Web.HtmlControls.Generics;
using Jayden.Dll.Web.HtmlControls.Interfaces;

namespace Jayden.Dll.Web.HtmlControls
{
	public class Embed : HtmlElement, WithSrc, WithType, WithHeight, WithWidth
	{
		public Embed() : base(EmbedDescription.Instance) { }

		public string Src { get { return this["src"]; } set { this["src"] = value; } }
		public string Type { get { return this["type"]; } set { this["type"] = value; } }
		public uint? Height { get { return GetAttributeUint("height"); } set { SetAttribute("height", value); } }
		public uint? Width { get { return GetAttributeUint("width");} set { SetAttribute("width", value); } }
	}
	public class EmbedDescription : HtmlElementDescription
	{
		public static readonly EmbedDescription Instance = new EmbedDescription();
		private EmbedDescription() : base("embed", HtmlVersion.Html5, false, false) { }
		public override Type ControlType { get { return typeof(Embed); } }
		public override string Description { get { return "integration point for external content."; } }
	}
}
